package student;

import java.util.Set;
import java.util.TreeSet;

public class TestStudent {
    public static void main(String[] args) {
        Set<Student> set=new TreeSet<>();
        set.add(new Student("张三1",22));
        set.add(new Student("张三2",20));
        set.add(new Student("张三2",21));
        set.add(new Student("张三1",22));
        System.out.println(set);
//        Student aa = new Student("张三", 22);
//        aa.compareTo(new Student("张三", 22));

    }
}
